import rxAjax from '@/assets/js/ajax.js';

// 登录 api接口
export const LoginApi = {};

LoginApi.authUrl= '/api-uaa';
LoginApi.userUrl= '/api-user';



//获取用户信息
LoginApi.getUserInfo = () => rxAjax.get(
  LoginApi.userUrl+'/user/org/osUser/current'
)

//退出登录
LoginApi.logout = (token) => rxAjax.postUrl(
  LoginApi.authUrl+'/oauth/remove/token',
  {"token": token}
)

//获取菜单
//根据appKey获取菜单
LoginApi.getMenusByAppKey= function(appKey) {
	let url = "/api-system/system/core/sysMenu/getMenusByAppKey?appKey=" + appKey;
	return rxAjax.get(url);
}

export  default LoginApi;
